package model.skill;

import model.effect.ConstantChangeStatEffect;
import model.effect.Effect;
import model.entity.Entity;
import model.entity.stats.Stat;
import model.entity.stats.StatType;

public class Staff extends ProjectileSkill{
	
private Stat levelStat;
	
	public Staff()
	{
		super(SkillType.STAFF, SkillType.STAFF, 0, ProjectileLibrary.getInstance().getLinearProjectile("staffAttack"), false);
		levelStat = new Stat(1, StatType.LEVEL);
	}
	
	public void activate(Entity entity)
	{
		ProjectileInformation projectileInfo = new ProjectileInformation(entity.getLocation(), entity.getDirection());
		
		int attackDamage = (int)levelStat.getValue();
		Effect newDamage = new ConstantChangeStatEffect("StaffDamage", StatType.HP, -(attackDamage*10));
		this.getProjectile().setEffect(newDamage);
		this.setInUse(true);
		this.getProjectile().propagate(projectileInfo);
		this.setInUse(false);
	}
}
